package edu.sctu.zhangwang.month201505.day20150510;

/**
 * Created by user10 on 2015/5/10.
 */
public class ClassTwo {

    public int a;
    public String age;
    public int sum;
    public ClassB classB;
    public ClassTwo(int a,String age){
        this.a = a;
        this.age = age;
    }

//    public ClassTwo(ClassB clas){
//        this.classB = clas;
//    }

    public void getData(ClassB classB){
        for (int i = 0;i<=classB.number;i++){
            sum += i;
        }
        System.out.println(sum);
    }
    public void getData1(){
        for (int i = 0;i<=a;i++){
            sum += i;
        }
        System.out.println(sum);
    }
    public void putData(){
        System.out.println(this.age);

    }
}
